<template>
    <div class="el-box">
        <TopNav></TopNav>
        <MainNav></MainNav>
        <div class="el-body-box">
            <div class="banner">
                <img src="../../../assets/image/banner01.jpg"/>
            </div>
            <div class="main">
                <el-tabs v-model="activeName" @tab-click="handleClick" v-if="tabList.length>0">
                    <el-tab-pane :label="item.name" :name="item.id+''" v-for="item in tabList" :key="item.id">
                        <div class="contentRow">
                            <el-row :gutter="20" v-if="activeList.length>0">
                                <el-col :span="6" v-for="(item, index) in activeList" :key="index">
                                    <div class="grid-content clearFix">
                                        <div class="cover" @click="$router.push({path:'/detail',query:{id:item.id}})">
                                            <el-image
                                                    :src="item.commodityImgurl?'http://111.85.220.186:1315'+item.commodityImgurl:src"></el-image>
                                        </div>
                                        <div class="details">
                                            <h3>{{item.commodityName}}</h3>
                                            <label>已有{{item.buyCount?item.buyCount:0}}人购买</label>
                                            <div class="price" v-if="item.beOverdue != 1 && !item.buyCommodity">
                                                &yen; <label>{{item.price}}</label>
                                            </div>
                                            <el-button v-if="item.buyCommodity == true || item.beOverdue == 1"
                                                       type="primary" class="getInto" size="small"
                                                       @click="goSystem(item.menuurl)">进入系统
                                            </el-button>
                                        </div>
                                    </div>
                                </el-col>
                            </el-row>

                            <div class="cartSpace" v-if="activeList.length<=0">
                                <i class="iconfont iconempty"></i>
                                <span>哎呀~ 这里没数据呐~ 换个的地方看看</span>
                            </div>
                        </div>
                    </el-tab-pane>
                </el-tabs>
            </div>
        </div>
    </div>
</template>

<script src="./index.js"></script>
<style lang="scss" src="./index.scss"></style>
